@extends('layout.admin')

@section('content')
	
	<div class="clearfix"></div>
	<div class="col-md-12" >
  @if(count($errors)>0)
      <div class="alert alert-info">
                @foreach($errors->all() as $error) 
                <li>
                <img src="/admins/images/info.png" alt="">&nbsp;
                {{$error}}</li>
                @endforeach
      </div>
 @endif
<div class="panel-head"><strong class="icon-reorder"> 添加分类</strong></div>
		<form class="form-horizontal" role="form" action='/admin/cate/insert' method='post' enctype='multipart/form-data'>
  		<div class="col-md-8">
        <div class="form-group" style='margin-top:50px'>
    			<label for="inputEmail3" class="col-sm-2 control-label">分类名称</label>
    			<div class="col-sm-10">
      				<input type="text" name='name' class="form-control"  placeholder="请填写您要添加的商品" value='{{old("uname")}}'>
    			</div>
  			</div>
  		<div class="form-group " style='margin-top:30px'>
          <label for="inputEmail3" class="col-sm-2 control-label">分类标题</label>
          <div class="col-sm-10">
              <select name="pid" class="input w70">
                <option value="0">请选择分类</option>
                 @foreach($cates as $k=>$v)
                <option value="{{$v->id}}">{{$v->name}}</option>
                 @endforeach
            </select>
          </div>
      </div>
  
      <!-- <div class="form-group" style='margin-top:50px'>
          
          <div class="field"> 
           <label>分类标题：
            <select name="pid" class="input w70">
              <option value="0">请选择分类</option>
               @foreach($cates as $k=>$v)
              <option value="{{$v->id}}">{{$v->name}}</option>
               @endforeach
            </select>
            </label>
            <div class="tips" title=""></div>
          </div>
      </div> -->
  	 		
  			<div class="mws-button-row" style='margin-left:300px '>
      	   {{csrf_field()}}
      			<input value="添加" class="btn btn-danger" type="submit" style='margin-right:30px'>
      			<input value="重置" class="btn " type="reset">
  			</div>
        </div>
		</form>
	


@endsection